package com.xx.springboot.controller;


import com.xx.springboot.entity.Comment;
import com.xx.springboot.entity.ResponseBo;
import com.xx.springboot.service.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.extension.api.ApiController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaoxiunique
 * @since 2018-08-06
 */
@RestController
@RequestMapping("/comment")
public class CommentController extends ApiController {

    @Autowired
    private ICommentService commentService;

    /**
     * <p>
     *     增加评论方法
     * </p>
     * @Author hcg
     * @Date 2018-11-20 11:43
     * @Param
     * @return
     **/
    @RequestMapping("/add")
    public ResponseBo add(Comment comment) {
        return commentService.addComment(comment);
    }

}

